Add custom Go base container setting#11
Open
shykes wants to merge 1 commit into
Open
Conversation
8f5448d to
e5436a9
Compare
Add a top-level base constructor setting for Go execution containers and pass it through module and directory execution paths. Keep the existing golang:<version>-alpine default when no base is provided. Treat version and base as mutually exclusive, because a caller-provided base container is a black box. When base is set, expose version as null. Add e2e coverage for custom base execution, the default version, and the version/base conflict. Signed-off-by: Solomon Hykes <solomon@dagger.io>
e5436a9 to
61e60f6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Go module always built its Go execution containers from
golang:<version>-alpine.That blocked users who need their own Go base container with internal certificates, proxy setup, pinned images, security updates, or preinstalled tools.
Solution
Add a top-level
baseconstructor setting. Ifbaseis not set, the module keeps the currentgolang:<version>-alpinebehavior.Pass that base container through the module and directory execution paths so helpers, tests, and generate use the configured container.
Make
versionandbasemutually exclusive. Whenbaseis set,versionis null because the image is a black box.Add e2e coverage that verifies the custom base is used by helper discovery, tests, and generate, and that setting both
versionandbasefails.Tests
dagger check -m .dagger/modules/e2eCloses #10